// 预约卸货模块
import { req, req3, fileUpload } from "@/api/req";

let api = {
  // 查询节假日设置
  queryHolidaySetting: (data) =>
    req(
      "srm",
      "get",
      "tblSubscribeHolidaySetting/getHolidaySettingList",
      data,
      false
    ),
  // 新增节假日设置
  addHolidaySetting: (data) =>
    req("srm", "post", "tblSubscribeHolidaySetting", data, false),
  // 编辑节假日设置
  editHolidaySetting: (data) =>
    req("srm", "put", "tblSubscribeHolidaySetting", data, false, true),

  // 查询卸货地点
  queryUnloadLocation: (data) =>
    req(
      "srm",
      "get",
      "tblSubscribeUnloadAddree/getSubscribeUnloadAddreeList",
      data,
      true
    ),
  // 新增卸货地点
  addUnloadLocation: (data) =>
    req("srm", "post", "tblSubscribeUnloadAddree", data, false),
  // 编辑卸货地点
  editUnloadLocation: (data) =>
    req("srm", "put", "tblSubscribeUnloadAddree", data, false, true),

  // 查询预约时间段
  queryAppointTime: (data) =>
    req(
      "srm",
      "get",
      "tblSubscribeTimeFrame/getSubscribeTimeFrameList",
      data,
      true
    ),
  // 新增预约时间段
  addUnAppointTime: (data) =>
    req("srm", "post", "tblSubscribeTimeFrame", data, false),
  // 编辑预约时间段
  editUnAppointTime: (data) =>
    req("srm", "put", "tblSubscribeTimeFrame", data, false, true),

  // 查询仓管员
  queryWarehouseKeeper: (data) =>
    req(
      "srm",
      "get",
      "tblCompanySpecialManager/getSpecialManagerList",
      data,
      false
    ),
  // 新增仓管员
  addWarehouseKeeper: (data) =>
    req("srm", "post", "tblCompanySpecialManager", data, false),
  // 编辑仓管员
  editWarehouseKeeper: (data) =>
    req("srm", "put", "tblCompanySpecialManager", data, false, true),

  // 查询预约列表
  queryAppointLis: (data) =>
    req("srm", "get", "srmTblAppointment/list", data, true),
  //根据采购订单查询剩余车数
  queryRemainQty: (data) =>
    req("srm", "get", "srmTblAppointment/getResidueByPurchase", data, true),
  //编辑预约列表
  editAppointLis: (data) =>
    req("srm", "put", "srmTblAppointment", data, false, true),
  //现场开单
  saveAppointLis: (data) =>
    req("srm", "post", "srmTblAppointment", data, false, true),
  //送货确认到达
  confirmDelivery: (data) =>
    req("srm", "post", "srmTblAppointment/confirmDelivery", data, false, true),
  //预约通过/预约退回
  passOrReturnAppointment: (data) =>
    req(
      "srm",
      "post",
      "srmTblAppointment/passOrReturnAppointment",
      data,
      false,
      true
    ),
  //卸货确认
  unloadComfim: (data) =>
    req("srm", "post", "srmTblAppointment/unloadComfim", data, false, true),
  //获取地磅重
  getWeight: (data) => req("srm", "get", "async/syncWeightData", data, true),
  //获取地磅重
  getDeliveryDetail: (data) =>
    req("srm", "get", "tblDeliverybill/deliverybillDetailOne", data, false),
};

export default api;
